import request from '@/utils/request'

// 查询考场信息列表
export function listExamVenue(query) {
  return request({
    url: '/examation/examVenue/list',
    method: 'get',
    params: query
  })
}

// 查询考场信息所有列表
export function listAllExamVenue(query) {
  return request({
    url: '/examation/examVenue/listAll',
    method: 'get',
    params: query
  })
}

// 查询考场信息详细
export function getExamVenue(id) {
  return request({
    url: '/examation/examVenue/getInfo/' + id,
    method: 'get'
  })
}

// 新增考场信息
export function addExamVenue(data) {
  return request({
    url: '/examation/examVenue/add',
    method: 'post',
    data: data
  })
}

// 修改考场信息
export function updateExamVenue(data) {
  return request({
    url: '/examation/examVenue/edit',
    method: 'post',
    data: data
  })
}

// 删除考场信息
export function delExamVenue(id) {
  return request({
    url: '/examation/examVenue/remove/' + id,
    method: 'get'
  })
}

// 批量删除考场信息
export function batchDelExamVenue(ids) {
  return request({
    url: '/examation/examVenue/batchRemove',
    method: 'post',
    data: ids
  })
}

// 导出考场信息
export function exportExamVenue(query) {
  return request({
    url: '/examation/examVenue/export',
    method: 'post',
    params: query,
    responseType: 'blob'
  })
}

// 导入考场信息
export function importExamVenue(data) {
  return request({
    url: '/examation/examVenue/import',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data: data
  })
}
